package com.xinbochuang.machine.admin.domain.macRoom.json;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xinbochuang.machine.admin.domain.macRoom.EquipmentDetail;
import lombok.Data;

/**
 * 机柜可视化node实体类
 *
 * @author 黄晓鹏
 * @date 2020-11-23 18:54
 */
@Data
public class Node {

    /**
     * id
     */
    private Integer id;

    /**
     * 是否可以拖拽
     */
    private boolean draggable = true;

    /**
     * 类型：？
     */
    private String type = "rectangle";

    /**
     * 文字
     */
    private String label;

    /**
     * 文字设置
     */
    private LabelCfg labelCfg = new LabelCfg();

    /**
     * 宽度
     */
    private Integer width = 60;

    /**
     * 高度
     */
    private Integer height = 30;

    /**
     * 最小宽度
     */
    private Integer minWidth = 20;

    /**
     * 最小高度
     */
    private Integer minHeight = 20;

    /**
     * 锚点
     */
    private double[][] anchorPoints = {{0, 0}, {0.25, 0}, {0.5, 0}, {0.75, 0}, {1, 0}, {1, 0.25}, {1, 0.5}, {1, 0.75}, {1, 1}, {0.75, 1}, {0.5, 1}, {0.25, 1}, {0, 1}, {0, 0.75}, {0, 0.5}, {0, 0.25}};

    /**
     * 旋转控制
     */
    private ShapeControl shapeControl = new ShapeControl();

    /**
     *
     */
    private String name;

    /**
     * 坐标x
     */
    private double x;

    /**
     * 坐标y
     */
    private double y;

    /**
     * 大小
     */
    private double[] size = {60, 30};

    /**
     * 样式
     */
    private Style style = new Style();

    /**
     * 角度
     */
    private String radian;

    /**
     *
     */
    private String groupId;

    /**
     * u位
     */
    @JsonProperty("uNum")
    private String uNum;

    /**
     * 机房id
     */
    private String macId;

    /**
     * 机柜id
     */
    private String cabinetId;

    /**
     * 机柜名称
     */
    private String cabinetName;

    /**
     * 设备id
     */
    private String equId;

    /**
     * 设备详情
     */
    private EquipmentDetail equ;

}
